﻿<%@ Page Title="Cirrus - Marchand Test" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="MarchandTest.aspx.cs" Inherits="Cirrus.DatabaseTest" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="Id" DataSourceID="SqlDataSource1" 
    EmptyDataText="There are no data records to display." AllowPaging="True" 
        AllowSorting="True">
    <Columns>
        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
            ShowSelectButton="True" />
        <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" 
            SortExpression="Id" />
        <asp:BoundField DataField="Nom" HeaderText="Nom" SortExpression="Nom" />
        <asp:BoundField DataField="Adresse" HeaderText="Adresse" 
            SortExpression="Adresse" />
        <asp:BoundField DataField="Ville" HeaderText="Ville" SortExpression="Ville" />
        <asp:BoundField DataField="Telephone" HeaderText="Telephone" 
            SortExpression="Telephone" />
        <asp:BoundField DataField="DateCreation" HeaderText="DateCreation" 
            SortExpression="DateCreation" />
        <asp:BoundField DataField="Industrie" HeaderText="Industrie" 
            SortExpression="Industrie" />
        <asp:BoundField DataField="Province" HeaderText="Province" 
            SortExpression="Province" />
        <asp:BoundField DataField="Pays" HeaderText="Pays" SortExpression="Pays" />
    </Columns>
</asp:GridView>
    <asp:DetailsView ID="DetailsView3" runat="server" AutoGenerateRows="False" 
        DataKeyNames="Id" DataSourceID="SqlDataSource1" DefaultMode="Insert" 
        Height="50px" Width="125px">
        <Fields>
            <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" 
                ReadOnly="True" SortExpression="Id" />
            <asp:BoundField DataField="Nom" HeaderText="Nom" SortExpression="Nom" />
            <asp:BoundField DataField="Adresse" HeaderText="Adresse" 
                SortExpression="Adresse" />
            <asp:BoundField DataField="Ville" HeaderText="Ville" SortExpression="Ville" />
            <asp:BoundField DataField="Telephone" HeaderText="Telephone" 
                SortExpression="Telephone" />
            <asp:BoundField DataField="DateCreation" HeaderText="DateCreation" 
                SortExpression="DateCreation" />
            <asp:BoundField DataField="Industrie" HeaderText="Industrie" 
                SortExpression="Industrie" />
            <asp:BoundField DataField="Province" HeaderText="Province" 
                SortExpression="Province" />
            <asp:BoundField DataField="Pays" HeaderText="Pays" SortExpression="Pays" />
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:CirrusConnectionString1 %>" 
    DeleteCommand="DELETE FROM [Marchand] WHERE [Id] = @Id" 
    InsertCommand="INSERT INTO [Marchand] ([Nom], [Adresse], [Ville], [Telephone], [DateCreation], [Industrie], [Province], [Pays]) VALUES (@Nom, @Adresse, @Ville, @Telephone, @DateCreation, @Industrie, @Province, @Pays)" 
    ProviderName="<%$ ConnectionStrings:CirrusConnectionString1.ProviderName %>" 
    SelectCommand="SELECT [Id], [Nom], [Adresse], [Ville], [Telephone], [DateCreation], [Industrie], [Province], [Pays] FROM [Marchand]" 
    UpdateCommand="UPDATE [Marchand] SET [Nom] = @Nom, [Adresse] = @Adresse, [Ville] = @Ville, [Telephone] = @Telephone, [DateCreation] = @DateCreation, [Industrie] = @Industrie, [Province] = @Province, [Pays] = @Pays WHERE [Id] = @Id">
    <DeleteParameters>
        <asp:Parameter Name="Id" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="Nom" Type="String" />
        <asp:Parameter Name="Adresse" Type="String" />
        <asp:Parameter Name="Ville" Type="String" />
        <asp:Parameter Name="Telephone" Type="String" />
        <asp:Parameter Name="DateCreation" Type="DateTime" />
        <asp:Parameter Name="Industrie" Type="Int32" />
        <asp:Parameter Name="Province" Type="String" />
        <asp:Parameter Name="Pays" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="Nom" Type="String" />
        <asp:Parameter Name="Adresse" Type="String" />
        <asp:Parameter Name="Ville" Type="String" />
        <asp:Parameter Name="Telephone" Type="String" />
        <asp:Parameter Name="DateCreation" Type="DateTime" />
        <asp:Parameter Name="Industrie" Type="Int32" />
        <asp:Parameter Name="Province" Type="String" />
        <asp:Parameter Name="Pays" Type="String" />
        <asp:Parameter Name="Id" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
<div _designerregion="0">
</div>
    <br />
</asp:Content>

